package cn.wzy.common;

/**
 * @author nihaowzy
 * @date 2020"/12/22 16:41
 * 每页数据信息
 */
public class PageInfo<T> {
    /**
     * 当前页码
     */
    private Integer page;
    /**
     * 每页数据条数
     */
    private Integer limit;
    /**
     * 每页数据内容集合
     */
    private Object data;
    /**
     * 一共有多少条数据
     */
    private Integer count;

    public PageInfo(Integer page, Integer limit, Object data, Integer count) {
        this.page = page;
        this.limit = limit;
        this.data = data;
        this.count = count;
    }

    public PageInfo() {
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    @Override
    public String toString() {
        return "PageInfo{" +
                "page=" + page +
                ", limit=" + limit +
                ", data=" + data +
                ", count=" + count +
                '}';
    }
}
